package com.kaisu.blog.common.util;

import cn.hutool.core.io.FileTypeUtil;

import java.util.HashSet;
import java.util.Set;

/**
 * @author kaisu
 */
public class FileUtils {
    private static final Set<String> imageTypeSet = new HashSet<>();
    static {
        imageTypeSet.add("png");
        imageTypeSet.add("jpg");

    }
    public static boolean fileIsImageByPath(String path) {
        return !imageTypeSet.contains(FileTypeUtil.getTypeByPath(path));
    }
}
